<?
$HTMLFormName   = "ReceiptForm";
if (GetParam("debtur","")) {
	$SQL = "SELECT * FROM idms_general.tbldebitur WHERE CUCODE = '".GetParam("debtur","")."'";
//	print $SQL;
	$Result = $DBConnection->dbc->get_row($SQL);
	if ($Result) {
		$js_script .= "  window.opener.document.".$HTMLFormName.".debtur.value = '".$Result->CUCODE."';\n";
		$js_script .= "  window.opener.document.".$HTMLFormName.".debnam.value = '".$Result->CUNAME ."';\n";
		$js_script .= "  window.opener.document.".$HTMLFormName.".npwp.value   = '".$Result->CUNPWP."';\n";
		$js_script .= "  window.opener.document.".$HTMLFormName.".addr.value   = '".$Result->CUADDR."';\n";
		$js_script .= "  self.close();";
		print $js_script;
	}
} 
?>